﻿using System;
using Geotools.Geometries;
using System.Xml.Linq;

namespace AzukiMap.MapSource
{
    public class RasterFileSource : RasterSource
    {
        public RasterFileSource()
            : base("raster file", MapSourceTypes.Raster, AzukiMapSettings.DEFAULT_SRID, CoordinationUnits.DEGREES)
        {
            
        }

        public RasterFileSource(string name, MapSourceTypes type, int srid, CoordinationUnits coordUnit)
            : base(name, type, srid, coordUnit)
        {
        }

        //public RasterFileSource(Uri imgUri, GTPolygon imgExtent, double imgOrgWidth, double imgOrgHeight, int dpi, string name, MapSourceTypes type, int srid, CoordinationUnits coordUnit)
        public RasterFileSource(Uri imgUri, GTEnvelope imgExtent, double imgOrgWidth, double imgOrgHeight, int dpi, string name, MapSourceTypes type, int srid, CoordinationUnits coordUnit)
            : base(name, type, srid, coordUnit)
        {
            _width = imgOrgWidth;
            _height = imgOrgHeight;
            _rasterSourceUri = imgUri;
            _maxExtent = imgExtent;
            _dpi = dpi;
        }

        public override XElement ToXml()
        {
            return ToXml("RasterFileSource");
        }

        public override XElement ToXml(string elementName)
        {
            return base.ToXml(elementName);
        }


    }
}
